<template>


	<view v-for="(item,index) in List" :key="index" class="item" >

		<uni-card :is-shadow="false">

			<view class="room">
				<text>
					{{item.nb}}
				</text>
				<text style="padding: 0 20rpx;">
					{{item.room}}
				</text>

				<text>
					{{item.session_date}}/{{item.am_pm}}
				</text>

			</view>
			
			
			<view class="name">
				{{item.name}}
				<!-- [<text style="color: #a31953" @click="viewDetail(item)">View Detail</text>] -->
			</view>
			
			
			<view class="organized">
				<text style="padding-right: 20rpx;">Organized by</text>
				<text v-for="(organizer,index2) in item.organizer" :key="index2" style="padding-right: 20rpx;">
					<uni-icons type="person"></uni-icons>{{organizer.first_name}}  {{organizer.last_name}}
				</text>
			</view>
			
			<view class="chaired">
				<text style="padding-right: 20rpx;">Chaired by</text>
				<text v-for="(chairman,index3) in item.chairman" :key="index3" 
				style="padding-right: 20rpx;color: #a31953;text-decoration: underline;"
				@click="chairmanClick(chairman,index3)"
				>
				<uni-icons type="person"></uni-icons>	{{chairman.first_name}}  {{chairman.last_name}}
				</text>
			</view>
			
			
			<view class="operate redText" >
				<view class="View Paper" @click="itemClick(item,index)">
				<text> View Detail</text>	
				</view>
	
		
			</view>
			
			

			
			
			
			
			
			
			
			
			
		</uni-card>



	


	</view>
	

	
	
</template>

<script>
	export default {
		props: {
			List: {
				type: Array,
				default: () => []
			}
		},
		data(){
			return{
				paper:[]
			}
		},

		methods:{
			chairmanClick(man,index){
				// #ifdef APP
				uni.navigateTo({
					url:`/pages/webView/webView?type=user&uid=${man.people_id}`
				})
				// #endif
				
				// #ifdef H5
				window.open(`https://piers.org/profile.html?uid=${man.people_id}`)
				// #endif
	
			},
			viewDetail(item){
				uni.navigateTo({
					url:`/pages/webView/webView?src=${JSON.stringify("https://chiba2025.piers.org/session.html?sid="+item.session_id)}`
				})
			},
			itemClick(item,index){
				uni.navigateTo({
					url:`/pages/Program/Detail?session_id=${item.session_id}`
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.item {}
	.operate{
		display: flex;
		flex-direction: row-reverse;
	}

</style>